package com.starlight.flower_server.domain.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.starlight.flower_server.domain.TotalData;
import com.starlight.flower_server.domain.article.cqrs.ArticlePageQuery;
import com.starlight.flower_server.domain.article.data.ArticleData;
import com.starlight.flower_server.infrastructure.entity.Article;

import java.util.List;

/**
 * @Author yfy2001
 * @date 2023/4/6 8:45
 */
public interface ArticleService {
    ArticleData queryArticleDetailById(Long id);

    Integer logicDeleteArticleById(Long id);

    Integer insertArticle(Article article);

    Integer modifyArticle(Article article);

    IPage<ArticleData> queryArticleDataList(ArticlePageQuery query);

    TotalData<ArticleData> queryAllArticleData();

    TotalData<ArticleData> queryArticleTotalCount();

    List<ArticleData> queryRandomArticleList(Integer count);

    Integer addArticleHit(Long id);
}
